import fetch from 'common/src/utils/fetch'

let api = {
    // 获取职称
  getTitleNameList() {
        return fetch({
            url: '/api/designservice/reviewManage/getTitleNameList',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 录入评阅成绩
  inputReviewResult(data) {
        return fetch({
            url: '/api/designservice/reviewManage/inputReviewResult',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 分配评阅专家
  distributeReviewer(data, chooseFlag) {
        return fetch({
            url: '/api/designservice/reviewManage/distributeReviewer?chooseFlag='+chooseFlag,
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 导出
    export(data, role) {
        return fetch({
            url: '/api/designservice/reviewManage/exportReviewList?role='+ role,
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    getExportStatus(key) {
        return fetch({
            url: `/api/designservice/common/exportExcelResult/${key}`,
            method: 'get',
            showMask: false
        })
    },
    // 查学院
    getCollege() {
        let authId = localStorage.getItem('activeAuthId')
        return fetch({
            url: `/api/designservice/common/college?authId=${authId}`,
            method: 'get',
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 根据年份和学院查专业
    getSubject(data) {
        return fetch({
            url: '/api/designservice/common/findSubject',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    }
}

export default api
